<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>新增小程序</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--css,js-->
	<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.10.2.js'/>"></script>
  </head>
  <style>
  </style>
  <body>
   <div class="a_box">
   		小程序名称：<input name="appName" class="appName"/><br>
   		logo:<input name="logo" class="logo"/><br>
   		二维码：<input name="qrcode" class="qrcode"/><br>
   		内部截图：<textarea rows="5" cols="80" name="screenShot" class="screenShot"/></textarea><br>
   		小程序介绍：<textarea rows="5" cols="80" name="introduce" class="introduce"/></textarea><br>
   		分类：<input name="category" class="category"/><br>
   		<input type="submit" class="submit" value="提交"/><br>
   </div>
   <script type="text/javascript">
   	$(function(){
   		$(".submit").on("click",function(){
   			$.ajax({
   				url:"<c:url value='/xcx/save'/>",
	   			type:"GET",
	   			data:{
	   				appName:$.trim($(".appName").val()),
	   				logo:$.trim($(".logo").val()),
	   				qrcode:$.trim($(".qrcode").val()),
	   				category:$.trim($(".category").val()),
	   				introduce:$.trim($(".introduce").val()),
	   				screenShot:$.trim($(".screenShot").val())
	   			},
	   			success:function(e){
	   				console.log("e="+e);
	   				$(".appName").val("");
	   				$(".logo").val("");
	   				$(".qrcode").val("");
	   				$(".category").val("");
	   				$(".introduce").val("");
	   				$(".screenShot").val("");
	   			}
   			});
   		});
   	});
   </script>
  </body>
</html>
